package com.ebocy.hammer.core.domain;

import java.sql.Timestamp;

import com.ebocy.hammer.core.db.annotations.Entity;
import com.ebocy.hammer.core.db.annotations.Ignore;
import com.ebocy.hammer.core.db.model.BaseEntity;

/**
 * @author HouQingrong May 15, 2012
 */
@Entity
public class Account extends BaseEntity {
	private static final long serialVersionUID = 1L;

	public static String PLATFROMID = "platfromId";
	public static String GAMEPLAYERID = "gamePlayerId";
	public static String STATUS = "status";
	public static String NAME = "name";
	public static String GENDER = "gender";
	public static String HEADICON = "headIcon";
	public static String EMAIL = "email";
	public static String BIRTHDAY = "birthDay";
	public static String INSTALLTIME = "installTime";
	public static String UNISTALLTIME = "unistallTime";
	public static String UPDATETIME = "updateTime";
	public static String LASTLOGINTIME = "lastLoginTime";
	public static String CLIENTADDRESS = "clientAddress";


	//平台id
	public String platfromId;
	//游戏id
	public long gamePlayerId;
	//状态
	public String status;
	//名字
	public String name;
	//性别
	public String gender;
	//头像
	public String headIcon;
	//邮箱
	public String email;
	//生日
	public String birthDay;
	//创建日期
	public Timestamp installTime;
	//卸载日期
	public Timestamp unistallTime;
	//更新时间
	public Timestamp updateTime;
	//最后登录时间
	public Timestamp lastLoginTime; // 登录的时间戳,当玩家选择角色后登录开始做超时校验,默认时间1分钟
	//客户端地址
	public String clientAddress;

	public String getPlatfromId() {
		return platfromId;
	}

	public void setPlatfromId(String platfromId) {
		this.platfromId = platfromId;
	}

	public long getGamePlayerId() {
		return gamePlayerId;
	}

	public void setGamePlayerId(long gamePlayerId) {
		this.gamePlayerId = gamePlayerId;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getHeadIcon() {
		return headIcon;
	}

	public void setHeadIcon(String headIcon) {
		this.headIcon = headIcon;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getClientAddress() {
		return clientAddress;
	}

	public void setClientAddress(String clientAddress) {
		this.clientAddress = clientAddress;
	}

	public boolean isCurrentInGame() {
		return currentInGame;
	}

	public String getBirthDay() {
		return birthDay;
	}

	public void setBirthDay(String birthDay) {
		this.birthDay = birthDay;
	}

	public Timestamp getInstallTime() {
		return installTime;
	}

	public void setInstallTime() {
		this.installTime = new Timestamp(System.currentTimeMillis());
	}

	public Timestamp getUnistallTime() {
		return unistallTime;
	}

	public void setUnistallTime() {
		this.unistallTime = new Timestamp(System.currentTimeMillis());
	}

	public Timestamp getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime() {
		this.updateTime = new Timestamp(System.currentTimeMillis());
	}

	public Timestamp getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime() {
		this.lastLoginTime =  new Timestamp(System.currentTimeMillis());
	}

	public void setCurrentInGame(boolean currentInGame) {
		this.currentInGame = currentInGame;
	}

	@Ignore
	private boolean currentInGame = false;
}
